package com.mgface.framework.springcloud.hystrix;

import com.mgface.framework.springcloud.entity.User;
import com.mgface.framework.springcloud.feign.UserFeignClient;
import org.springframework.stereotype.Component;

/**
 * @author wanyuxiang
 * @version 1.0
 * @project ms-hystrix
 * @create 2017-04-11 16:03
 **/
@Component
public class HystrixClientFallback implements UserFeignClient {
    @Override
    public User findById(Long id) {
        User u = new User();
        u.setId(0L);
        u.setUsername("default");
        return u;
    }
}
